package com.currency.controller;

import com.alibaba.fastjson.JSONObject;
import com.currency.mapper.WytVersionMapper;
import com.currency.pojo.WytVersionPojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Hello {
    @Autowired
    private WytVersionMapper mapper;

    @RequestMapping("hello")
    public String hello(String name) {
        WytVersionPojo pojo = mapper.selectById("0.0.0");
        return "Hello " + name + " my version is " + JSONObject.toJSONString(pojo);
    }
}
